export const findComponent = function (name, parent) {
  let nextComponent = parent
  if (!nextComponent) return false
  let parentName = nextComponent.$options.name
  if (parentName === name) {
    return nextComponent
  } else {
    return findComponent(name, nextComponent.$parent)
  }
}
